// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ResumenPersistor.java

package org.fiel.persistence;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.fiel.commons.jdbc.Persistor;
import org.fiel.domain.Resumen;

public class ResumenPersistor extends Persistor
{

    public ResumenPersistor()
    {
    }

    protected String getTableNames()
    {
        return " resumen ";
    }

    protected Object extract(ResultSet rs)
    {
        Resumen resumen = new Resumen();
        try
        {
            resumen.setIndeint(new Integer(rs.getInt("indeint")));
            resumen.setTitulo(rs.getString("titulo"));
            resumen.setTituloE(rs.getString("tituloE"));
            resumen.setDescripcion(rs.getString("descripcion"));
            resumen.setDescripcionE(rs.getString("descripcionE"));
            resumen.setPublicacion(rs.getString("namefile"));
            resumen.setValor(rs.getString("valor"));
            resumen.setTipoPublicacion(rs.getString("identipo"));
        }
        catch(SQLException e)
        {
            e.printStackTrace();
        }
        return resumen;
    }

    protected List getOrderByFields()
    {
        List ls = new ArrayList();
        ls.add("resumen.indeint");
        return ls;
    }

    protected List getFields()
    {
        List ls = new ArrayList();
        ls.add("resumen.indeint");
        ls.add("resumen.titulo");
        ls.add("resumen.tituloE");
        ls.add("resumen.descripcion");
        ls.add("resumen.descripcionE");
        ls.add("resumen.valor");
        ls.add("informacion.namefile");
        ls.add("informacion.identipo");
        return ls;
    }

    protected void appendConstraints(StringBuffer buffer)
    {
        buffer.append(" left outer join informacion on publicacion=idenint ");
    }
}
